Skip to content

Conversation

@robotpilot
Copy link
Member

No description provided.

Woojin-Crive and others added 15 commits April 4, 2025 08:20
- Add omy_hat.model and omy_end.model to supported dynamixel models
- Update dynamixel.model to include new OMY models (220 and 230)
- Update gitignore to ensure model files are tracked
- Changed value_of_min_radian_position to -740 and min_radian to -1.099 in omy_end.model and rh_p12_rn.model for handling negative values
…t control

- Updated ReadMultiDxlData, GetDxlValueFromSyncRead, and GetDxlValueFromBulkRead to accept a period_ms parameter.
- Introduced ProcessReadCommunication and ProcessReadData functions for better data handling and communication management.
- Enhanced error handling and logging for read operations.
Signed-off-by: Wonho Yun <[email protected]>
Signed-off-by: Wonho Yun <[email protected]>
Signed-off-by: Wonho Yun <[email protected]>
Signed-off-by: Wonho Yun <[email protected]>
@robotpilot robotpilot self-assigned this Apr 5, 2025
@robotpilot robotpilot added the bump Increase the version number to release label Apr 5, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @robotpilot, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

This pull request bumps the version of the dynamixel_hardware_interface package to 1.4.2. It includes adding OM-Y dynamixel model files, adding a function to enable torque, and fixing the configuration for OM-Y robots. The pull request also introduces controller items, modifies the read function to include a period, and adds a retry mechanism for writing items.

Highlights

  • New Dynamixel Models: Adds OM-Y dynamixel model files (omy_hat.model, omy_end.model) and updates dynamixel.model to include these new models.
  • Torque Enable Functionality: Introduces a global torque enable parameter and modifies the start function to enable/disable torque based on this parameter.
  • Controller Items: Adds support for controller items, allowing initialization and control of Dynamixel controllers.
  • Read Function Modification: Modifies the read function to include a period parameter, which is used in the ReadMultiDxlData function.
  • Retry Write Item: Implements a retry mechanism for writing items to Dynamixel devices, improving robustness.

Changelog

Click here to see the changelog
  • .gitignore
    • Added exception for dynamixel model files.
  • CHANGELOG.rst
    • Added OM-Y dynamixel model files
    • Added a function to enable torque
    • Fixed the configuration for OM-Y robots
  • include/dynamixel_hardware_interface/dynamixel/dynamixel.hpp
    • Added <functional> include.
    • Modified ReadMultiDxlData, GetDxlValueFromSyncRead, and GetDxlValueFromBulkRead to accept a period_ms parameter.
    • Added ProcessReadData and ProcessReadCommunication functions for processing read data and communication.
  • include/dynamixel_hardware_interface/dynamixel_hardware_interface.hpp
    • Added global_torque_enable_ member variable.
    • Added controller_id_ and controller_item_ member variables.
    • Added initItems, retryWriteItem, and InitControllerItems functions.
  • package.xml
    • Bumped version to 1.4.2.
    • Added Wonho Yun as an author.
  • param/dxl_model/dynamixel.model
    • Added OM-Y dynamixel model files (omy_hat.model, omy_end.model).
  • param/dxl_model/omy_end.model
    • Added new dynamixel model file for omy_end.
  • param/dxl_model/omy_hat.model
    • Added new dynamixel model file for omy_hat.
  • param/dxl_model/rh_p12_rn.model
    • Fixed min_radian value.
  • src/dynamixel/dynamixel.cpp
    • Added <functional> include.
    • Modified DynamixelDisable to return DxlError.
    • Modified ReadMultiDxlData, GetDxlValueFromSyncRead, and GetDxlValueFromBulkRead to accept a period_ms parameter.
    • Implemented ProcessReadCommunication and ProcessReadData functions.
  • src/dynamixel_hardware_interface.cpp
    • Added parsing of torque_enable parameter.
    • Added support for controller items during initialization.
    • Modified start function to enable/disable torque based on global_torque_enable_.
    • Modified read function to include a period parameter in ReadMultiDxlData call.
    • Added InitControllerItems function.
    • Implemented retryWriteItem function.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


A motor's hum, a robot's grace,
Code aligns, finds its place.
Torque enabled, it will start,
A symphony of code and heart.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-project-automation github-project-automation bot moved this to 🌱 Todo in Platform Apr 5, 2025
@robotpilot robotpilot moved this from 🌱 Todo to 📝 Pull Request in Platform Apr 5, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request bumps the version to 1.4.2, adds OM-Y dynamixel model files, adds a function to enable torque, and fixes the configuration for OM-Y robots. The changes look good overall, but there are a few areas that could be improved.

Summary of Findings

  • Error Handling in DynamixelDisable: The DynamixelDisable function could return early if an error occurs while disabling torque on one of the Dynamixels. It's better to attempt disabling torque on all Dynamixels and then return an error if any of them failed.
  • Missing Timeout for Communication: The ProcessReadCommunication function does not have a timeout mechanism when receiving packets, which could lead to indefinite blocking if a Dynamixel fails to respond.
  • Inconsistent use of static keyword: The is_set_hdl variable is declared as static in InitDxlReadItems and InitDxlWriteItems initially, but later it is changed to a member variable is_set_hdl_. This inconsistency can lead to confusion and unexpected behavior.

Merge Readiness

The pull request is almost ready for merging. However, the high severity issue in DynamixelDisable should be addressed before merging. The medium severity issues related to communication timeouts and the static keyword should also be considered for improvement before merging. I am unable to directly approve this pull request, and recommend that others review and approve this code before merging.

@robotpilot robotpilot merged commit a55dafe into jazzy Apr 5, 2025
25 checks passed
@robotpilot robotpilot deleted the bump-1.4.2 branch April 5, 2025 09:50
@github-project-automation github-project-automation bot moved this from 📝 Pull Request to 🚩Done in Platform Apr 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bump Increase the version number to release

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants